package com.wn.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wn.model.entity.Book;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* @author KOO
* @description 针对表【t_book】的数据库操作Service
* @createDate 2024-12-08 14:53:59
*/
public interface BookService extends IService<Book> {

    Page<Book> findTopSales(Integer pageNum, Integer pageSize);

    /**
     * 按书籍的类型查询书籍，并且分页，按更新时间降序排序
     */
    Page<Book> findByType(Integer pageNum, Integer pageSize, Integer typeId);

    /**
     * 通过书籍id查询书籍
     */
    Book findById(Long id);

}
